<?php
/* @var $this SiteController */
/* @var $model ContactForm */
/* @var $form CActiveForm */

$this->pageTitle=Yii::app()->name . ' - Contact Us';
$this->breadcrumbs=array(
	Yii::t('default','Contact'),
);
?>

<h1><?php echo Yii::t('default','Contact') ?></h1>

<?php if(Yii::app()->user->hasFlash('contact')): ?>

<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('contact'); ?>
</div>

<?php else: ?>

<p>
<!-- If you have business inquiries or other questions, please fill out the following form to contact us. Thank you. -->
</p>

<div class="form">

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'contact-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>

<!-- 	<p class="note">Fields with <span class="required">*</span> are required.</p> -->

	<?php echo $form->errorSummary($model); ?>

	<?php echo  $form->textFieldControlGroup($model,'name',array('span'=>4,'maxlength'=>128)); ?>

	 <?php echo $form->textFieldControlGroup($model, 'email', array('span'=>4)); ?>

	 <?php echo  $form->textFieldControlGroup($model,'subject',array('span'=>4,'maxlength'=>128)); ?>
	 
	<?php echo $form->textAreaControlGroup($model, 'body', array('span' => 6, 'rows' => 6)); ?>

	

	<?php if(CCaptcha::checkRequirements()): ?>
	
	<?php echo $form->textFieldControlGroup($model, 'verifyCode', array(
		  'controlOptions' => array('before' => $this->widget('CCaptcha', array(), true) . '<br/>'),
		)); ?>
	

	<?php endif; ?>

	<div class="row buttons" ">
        <?php echo TbHtml::submitButton(Yii::t('default','Submit'),array(
		    'color'=>TbHtml::BUTTON_COLOR_PRIMARY,
		    'size'=>TbHtml::BUTTON_SIZE_DEFAULT,
		)); ?>
	</div>
	
	<?php $this->endWidget(); ?>

</div><!-- form -->

<?php endif; ?>